<?php
function curl_get_contents($url){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_TIMEOUT, 300);
    $res=curl_exec($ch);
    curl_close($ch);
    return $res;
}

// http://solrstatus.corp.anjuke.com/report/createhostdata/?datei=2010-06-21
// http://solrstatus.corp.anjuke.com/report/createdata/?datei=2010-06-21
$datei=date('Y-m-d',strtotime('-1 day'));
$url1="http://solrstatus.corp.anjuke.com/report/createhostdata/?datei=".$datei;
$url2="http://solrstatus.corp.anjuke.com/report/createdata/?datei=".$datei;

$res1=curl_get_contents($url1);
if($res1)echo "create ".$datei." host data\r\n";

$res2=curl_get_contents($url2);
if($res2)echo "create ".$datei." data\r\n";
